﻿@{
    ViewBag.Title = "请假申请-1";
    Layout = "~/Views/Shared/_FrameLayout.cshtml";
}
@section scripts
{


    <script>


        $(document).ready(function () {
            var config = {
                title: '请假申请单',
                url: '@Url.Action("GetAuditList")',
                colNames: ['主键','申请人', '请假开始时间', '请假结束时间', "天数", "事由","状态"],
                colModel: [
                    { name: 'Id', index: 'Id', width: 60, key: true, hidden: true },
                    { name: 'Person', index: 'Person' },
                    { name: 'StartDate', index: 'StartDate', formatter: 'date' ,formatoptions:{srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s'} },
                    { name: 'EndDate', index: 'EndDate', formatter: 'date' ,formatoptions:{srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s'}  },
                    { name: 'Days', index: 'Days' },
                    { name: 'Remark', index: 'Remark' },
                    { name: 'TaskName', index: 'TaskName' }
                ],
                sortname: 'CreateDate',
                sortorder: "desc"
            };
            WikeGrid.Load(config);


            $("#btnAudit").click(function () {

                var row = WikeGrid.GetData();
                if (row != null) {
                    $(this).button("loading");
                    window.location.href = "/Holiday/AuditDetailView?id=" + row.Id;
                } else {
                    parent.layer.alert("请选择要审核的数据");
                }
            });
        });
    </script>
}



<form id="searchToolBar" class="alert alert-info form-inline toolbarsearch" action="">
    <div class="form-group">
        <label for="keywords">关键字</label>
        <input type="text" id="keywords" name="keywords" autocomplete="off" class="form-control" placeholder="请输入关键字" />

    </div>
    <div class="form-group">
        <label for="Person">申请人</label>
        <input type="text" id="Person" name="Person" autocomplete="off" class="form-control" placeholder="请输入申请人" />
    </div>
    <div class="form-group">
        <label for="Days">天数</label>
        <input type="text" id="Days" name="Days" autocomplete="off" class="form-control" placeholder="请输入天数" />
    </div>
    
    <button class="btn btn-danger" id="btnSearch" type="button">
        <i class="fa menu-icon fa-cog "></i>查询
    </button>
   
    <button class="btn btn-default" data-url="@Url.Action("AuditDetailView")" id="btnAudit" type="button">
        审核
    </button>
    
</form>
<div class="jqGrid_wrapper">
    <table id="table_list"></table>
    <div id="pager_list"></div>
</div>

